{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import cv2\n",
    "import numpy as np\n",
    "\n",
    "# 读取图片\n",
    "image = cv2.imread(\"C:\\\\share\\\\MK\\\\img.png\", cv2.IMREAD_GRAYSCALE)\n",
    "\n",
    "# 应用Canny边缘检测\n",
    "edges = cv2.Canny(image, threshold1=100, threshold2=200)\n",
    "\n",
    "# 显示原图和处理后的图像\n",
    "cv2.imshow(\"Original Image\", image)\n",
    "cv2.imshow(\"Edges using Canny\", edges)\n",
    "\n",
    "# 等待按键后关闭所有窗口\n",
    "cv2.waitKey(0)\n",
    "cv2.destroyAllWindows()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjgAAAH4CAYAAABHdZffAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA9r0lEQVR4nO3deZxPhf7H8fd3mX3MYHbGPiGmrNeWrWSLrkSydaOFlKXlKtroqqZICFfurSgtXEmqm1BIqCm7iGyDGssslhnMmJnv+f3RNb+mQd9hZs73e+b1fDw+j0ff8z3fc94j5e2c8z3HZhiGIQAAAAuxmx0AAACguFFwAACA5VBwAACA5VBwAACA5VBwAACA5VBwAACA5VBwAACA5VBwAACA5VBwAACA5VBwAC+UlJQkm82muXPnmh3Fcmw2m8aPH292DABXiYIDmGDu3Lmy2WyXnO+++87siJc0fvz4AlkDAwNVtWpV3XrrrZozZ46ys7OveNvr16/X+PHjdfLkyeILfBGff/45JQawOKfZAYCy7B//+Idq1KhRaHlcXJwJaYpm1qxZCg4OVnZ2tn799VctW7ZM99xzj6ZOnarPPvtMVapUKfI2169fr+eee06DBg1S+fLliz/0/3z++eeaOXPmRUvOuXPn5HTyv0bA2/FfMWCirl27qmnTpmbHuCK9e/dWeHh4/utnn31W7733nv72t7/pjjvu8OijUJfj7+9vdgQAxYBTVICHO3nypAYNGqTQ0FCVL19ed9999yVP4SxcuFD16tWTv7+/4uPjtXjxYg0aNEjVq1cvsJ7L5dLUqVNVv359+fv7KyoqSkOHDtWJEyeuKuuAAQN03333KTExUStWrCjwXmJiorp06aLQ0FAFBgaqXbt2WrduXf7748eP1+jRoyVJNWrUyD8FlpSUlL/Ou+++qyZNmiggIEAVK1ZU3759dfjw4UI5EhMTdcstt6hChQoKCgrS9ddfr2nTpkmSBg0apJkzZ0pSgVNtF1zsGpzNmzera9euCgkJUXBwsDp06FCowF047bhu3To9+uijioiIUFBQkHr27KmUlJSi/2ICuCocwQFMdOrUKaWmphZYZrPZFBYWJkkyDEM9evTQ2rVr9cADD+jaa6/V4sWLdffddxfa1n//+1/deeeduu6665SQkKATJ07o3nvvVeXKlQutO3ToUM2dO1eDBw/WyJEjdeDAAc2YMUObN2/WunXr5OPjc8U/01133aV//etfWr58uTp27ChJWrlypbp27aomTZpo3LhxstvtmjNnjm666SZ98803atasmW6//Xb9/PPP+uCDDzRlypT8o0MRERGSpBdeeEHPPPOM+vTpo/vuu08pKSmaPn262rZtq82bN+ef0lqxYoW6d++umJgYjRo1StHR0frpp5/02WefadSoURo6dKiSk5O1YsUKzZs3709/nh07dqhNmzYKCQnR448/Lh8fH82ePVvt27fX119/rebNmxdYf8SIEapQoYLGjRunpKQkTZ06VcOHD9eCBQuu+NcUwBUwAJS6OXPmGJIuOn5+fvnrffzxx4YkY+LEifnLcnNzjTZt2hiSjDlz5uQvv+6664zY2FgjIyMjf9nq1asNSUa1atXyl33zzTeGJOO9994rkOmLL7646PI/GjdunCHJSElJuej7J06cMCQZPXv2NAzDMFwul3HNNdcYnTt3NlwuV/56Z8+eNWrUqGF07Ngxf9mkSZMMScaBAwcKbDMpKclwOBzGCy+8UGD59u3bDafTmb88NzfXqFGjhlGtWjXjxIkTBdb9/b4feugh41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O6f3331fr1q0VEhJy2W0AMAdHcAATLV26VLt27Sq0vFWrVqpZs6ZuvfVW3XDDDRozZoySkpJUr149ffTRRzp16lShz7z44ovq0aOHbrjhBg0ePFgnTpzQjBkzFB8fX6BYtGvXTkOHDlVCQoK2bNmiTp06ycfHR3v27NHChQs1bdo09e7d+0+zf/jhhwoODtb58+fz72S8bt06NWjQQAsXLsxfz26364033lDXrl1Vv359DR48WJUrV9avv/6qVatWKSQkRJ9++qmk38qQJD311FPq27evfHx8dOutt6pWrVp6/vnnNXbsWCUlJem2225TuXLldODAAS1evFhDhgzR3//+d9ntds2aNUu33nqrGjZsqMGDBysmJka7du3Sjh07tGzZsgL7GTlypDp37iyHw6G+ffte9Od8/vnntWLFCrVu3VoPPvignE6nZs+erezsbE2cOPFPf50AmMTMr3ABZdXlviauP3z9Oy0tzbjrrruMkJAQIzQ01LjrrruMzZs3F1rPMAxj/vz5Rt26dQ0/Pz8jPj7e+OSTT4xevXoZdevWLZThX//6l9GkSRMjICDAKFeunHHdddcZjz/+uJGcnHzZ7Be+Jn5h/P39jdjYWKN79+7GW2+9ZWRlZV30c5s3bzZuv/12IywszPDz8zOqVatm9OnTx/jqq68KrDdhwgSjcuXKht1uL/SV8UWLFhmtW7c2goKCjKCgIKNu3brGQw89ZOzevbvANtauXWt07NjRKFeunBEUFGRcf/31xvTp0/Pfz83NNUaMGGFEREQYNputwFfG9YeviRuGYWzatMno3LmzERwcbAQGBho33nijsX79+gLrXPh3+sMPPxRYvmrVKkOSsWrVqsv+ugIoXjbD4Mo3wMoaNmyoiIiIQncWBgAr4xocwCJycnKUm5tbYNnq1au1detWtW/f3pxQAGASjuAAFpGUlKSbb75ZAwcOVKVKlbRr1y69/vrrCg0N1Y8//pj/+AcAKAu4yBiwiAoVKqhJkyZ64403lJKSoqCgIHXr1k0vvfQS5QZAmcMRHAAAYDlcgwMAACyHggMAACyHggMAACzH7YuM3X12CwAAQEly5/JhjuAAAADLoeAAAADLoeAAAADLoeAAAADLoe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PfvsswoICNDJkyfVq1cvnT592uR08HYhISFaunSp8vLy1LZtW1OzcA0OAJQRUVFRGj9+vG644QZt2rRJBw4c0IQJEzz6brTwLqdPn1avXr00ePBgs6O4hSM4AODlwsPDlZCQoBYtWmj06NFl8mGRKFs4ggMAFubj46Np06apQoUKatKkiR588EF9+eWXZscCPAJHcADASy1ZskTt2rXToEGDlJqaqrVr15odCSgVHMEBAAtatmyZypcvrwYNGqhFixbasmWL2ZEAj0PBgdfasGGDKlasqJo1a5odBSgVCxYsULNmzVS1atX85wP9/sGqAP4fBQdeq2rVqgoPDzc7BlAq5syZo169eqlFixbau3evTp48aXYkwKNRcOCVtm/frrCwMIWEhJgdBShRNptNkyZN0l133aWbb75ZGzZsMDsS4BUoOPBKPj4+io6OVmZmptlRgBLjdDo1evRojRgxQnfccYdWr15tdiTAa1BwAMAD+fr66t5779WTTz6p4cOHa/HixWZHArwKBQcAPIyfn58GDhyoF198Uc8++6z+/e9/mx0J8Dp2swMARdWsWTNt2rRJ58+fNzsKUOx8fX119913a9KkSXr55Zc1ZcoUsyMB3slwkySG8Yj5+uuvjTp16pieg2FKYiIjI42TJ08ajz/+uOlZGMZTxx0cwQEAD+F0OvXYY48pOTlZEydONDsO4NW4BgcAPMTrr7+uPn366N577zU7CuD1KDgA4AEWL16sW265Rd26deOBmUAxoOAAgAfo3LmzWrVqpY0bN5odBbAErsEBAJNt3rxZ/v7+lBugGFFwAMBEP/zwgxo0aKCoqCizowCWQsEBAJPY7XYFBwerUqVKSklJMTsOYCkUHAAwyapVqxQbG6vc3FyzowCWQ8GBVwkPD9fJkyf5AwFeLzw8XH5+fvrLX/6i1NRUs+MAlkPBgVeZOXOmJk+erH379pkdBbhisbGxeu+991S+fHllZWWZHQewJAoOvEbdunV15MgRpaWlmR0FuGLVq1fX9OnTFR4erl69eikpKcnsSIAlUXDgNe677z6tX79eO3bsMDsKcMVuu+02RUdHa+jQofxeBkoQBQdeoVWrVsrIyNCPP/5odhTgqn344YfasGGD2T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Xbv3k3RwSVRcAAAXqVXr16aNGmSRo0apU8//dTsOPBQfIsKAOBVFi1apGXLlql79+6KiooyOw68GAUHAOBRFi9erDZt2mjSpEmqUKGC2XHgpThFBQDwOO3bt1dsbKwWL16sM2fOmB0HHoZrcAAAgOVwDQ4AACiTKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMByKDgAAMBynO6uaBhGSeYAAAAoNhzBAQAAlkPBAQAAlkPBAQAAlkPBAQAAlkPBAQAAlkPBAQAAlkPBAQAAlkPBAQAAlkPBAQAAlvN/554IVksrUmIAAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 800x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import cv2\n",
    "from matplotlib import pyplot as plt\n",
    "\n",
    "def extract_edges(image_path, threshold1, threshold2):\n",
    "    image = cv2.imread(image_path, cv2.IMREAD_GRAYSCALE)\n",
    "    blurred = cv2.GaussianBlur(image, (5, 5), 0)\n",
    "    edges = cv2.Canny(blurred, threshold1, threshold2)\n",
    "    return edges\n",
    "\n",
    "# Replace 'your_image_path.jpg' with the path to your image\n",
    "edges_image = extract_edges(\"C:\\\\share\\\\MK\\\\img.png\", 100, 200)\n",
    "\n",
    "# Display the edges using matplotlib\n",
    "plt.figure(figsize=(8, 6))\n",
    "plt.imshow(edges_image, cmap='gray')\n",
    "plt.title('Edge Detection')\n",
    "plt.axis('off')  # Hide axis\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "path=\"C:\\\\share\\\\MK\\\\img.png\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import cv2\n",
    "import numpy as np\n",
    "\n",
    "# 读取图片\n",
    "image = cv2.imread(path)\n",
    "\n",
    "# 创建一个更强的锐化滤波器核\n",
    "sharpening_kernel = np.array([[-1, -1, -1], [-1, 9 + 8, -1], [-1, -1, -1]])\n",
    "\n",
    "# 应用滤波器核进行锐化\n",
    "sharpened_image = cv2.filter2D(image, -1, sharpening_kernel)\n",
    "\n",
    "# 显示锐化后的图片\n",
    "cv2.imshow(\"Sharpened Image\", sharpened_image)\n",
    "cv2.waitKey(0)\n",
    "cv2.destroyAllWindows()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
